Week 4

Week 6: Embedded Programming

October 20 - October 27


[0] Overview
This week's assignments:
(1.) read the data sheet for your microcontroller
(1.) program your board to do something

[1] Data Sheet for the ATTINY 1614


The ATTINYs belong to a series of low power chips that run at 20 MHz. Within the long datasheet, there's quite a bit of useful information for my final project, especially the specifications of these devices for interruptions (like they can handle two). One takeaway that's good to know is that each pin can be used as a pullup IO, which can allow you to just place buttons from VCC to the pin. This saves routing hassles later on as well.

[2] Making the Board
Even though I failed on the previous ATTINY, I won't be making those mistakes again after I realized what I soldered incorrectly. So instead of just one LED, I chose five! This was a relatively straightforward circuit - the only part I forgot was to include was the RX and TX (which are mainly important if you want to just echo or gather data from the board itself, which is not the case here). However, I did leave the option open for I2C, which uses pins B0 and B1. These can network between different devices, which is something that will be covered in a future unit but is good to be exposed to early on.



Having done this a couple of times now, I was sucessfully able to mill out a great board (minus the name areas) for the LED array. This was a relatively quick mill, and I'll quickly fabricate the board with the correct parts. The best part about the ATTINYs is that they do not requre a regulator, since they can work with up to 5V unlike the SAMD11 chips.




[3] Creating a UPDI Programmer

Quickly realizing that we might run out of UPDI programmers, I sought after my own, and decided to make one using the FTDI breakout boards we had lying around.




In short, for the chip to be programmed efficinetly and faster, we would need a diode facing the Tx from the UPDI in addiition to the Rx pathway that it has. This is for a pinout that does NOT require serial. If we wanted serial, we would use all of those pins together for one. This way, we have a small package that can be used for all ATTINYs provided they have the following pinout orientation: Vcc, U, and Gnd.




In addition, I ended up using heat-shrink to make sure the components stay in place, which created a more professional look and feel to my new UPDI programmer. Now to test if it works with my board.

[4] Code and Final Product


The code this week was realtively straightforward. I first declared all the pinouts for each of the LEDs, and then caused them to blink together as an array. Later on, I was able to get them to blink in binary. It is really a sight though to finally get this chip working, considering the struggle I went through two weeks prior.